module Base
{

    item Grenade
    {
        DisplayCategory = Explosives,
        ItemType = base:weapon,
        Weight = 0.4,
        Icon = Grenade,
        ExplosionPower = 50,
        ExplosionRange = 8,
        ExplosionSound = PipeBombExplode,
        FireStartingEnergy = 0,
        FireStartingChance = 0,
        MaxDamage = 0.0,
        MaxHitcount = 0,
        MaxRange = 15.0,
        MinDamage = 0.0,
        MinimumSwingtime = 1.5,
        PhysicsObject = Base.PipeBomb,
        PlacedSprite = constructedobjects_01_32,
        SwingAmountBeforeImpact = 0.1,
        SwingAnim = Throw,
        SwingSound = Grenadepin,
        Swingtime = 1.5,
        Tooltip = Tooltip_Grenade,
        UseSelf = true,
        WeaponSprite = Grenade,
        WorldStaticModel = Grenade,
        ConditionMax = 1,
        AttachmentType = Webbing,
    }

	model Grenade
	{
		mesh = WorldItems/Grenade,	
		texture = WorldItems/Grenade,
		scale = 0.16,
	}

	sound Grenadepin
	{
		category = Item,
		maxInstancesPerEmitter = 2,
		clip
		{
			file = media/sound/Grenadepin.ogg,
			distanceMax = 17,
		}
	}

    item BandolierGrenades
    {
        DisplayCategory = Explosives,
        ItemType = base:normal,
        Weight = 1.6,
        Icon = GrenadeBandolier,
        WorldStaticModel = Grenade,
    }

    craftRecipe RemoveGrenadesFromBandolier
    {
        timedAction = UnPackBox,
        time = 50,
        category = Ammunition,
        recipeGroup = OpenBox,
        Tags = InHandCraft;CanBeDoneInDark,
        inputs
        {
            item 1 [Base.BandolierGrenades],
        }
        outputs
        {
            item 6 Base.Grenade,
        }

    }

    craftRecipe MakeGrenadeBandolier
    {
        timedAction = UnPackBox,
        time = 50,
        category = Ammunition,
        recipeGroup = OpenBox,
        Tags = InHandCraft;CanBeDoneInDark,
        inputs
        {
            item 6 [Base.Grenade],
        }
        outputs
        {
            item 1 Base.BandolierGrenades,
        }

    }

    craftRecipe MakeGrenade
    {
        timedAction = Welding,
        time = 150,
        NeedToBeLearn = true,
        SkillRequired = MetalWelding:2,
        Tags = AnySurfaceCraft,
        category = Metalworking,
        xpAward = MetalWelding:25,
        AutoLearnAny = MetalWelding:5,
        inputs
        {
            item 1 [Base.Springs],
            item 1 [Base.SmallSheetMetal],
            item 1 [Base.ScrapMetal],
            item 20 [Base.GunPowder],
            item 1 [Base.Twine],
            item 2 [Base.BlowTorch],
            item 1 tags[base:weldingmask] mode:keep,
        }
        outputs
        {
            item 1 Base.Grenade,
        }
    }

    item MagazineMagGrenade
    {
        DisplayCategory = RecipeResource,
        ItemType = base:literature,
        Weight = 0.5,
        Icon = MagazineWelding3,
        BoredomChange = -20,
        StressChange = -15,
        LearnedRecipes = MakeGrenade,
        StaticModel = Magazine,
        WorldStaticModel = MagazineMetal4Ground,
        Tags = base:magazine,
        OnCreate = ItemCodeOnCreate.onCreateRecipeMagazine,
    }

}